/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * frmReservaMesa.java
 *
 * Created on Mar 23, 2012, 8:10:50 PM
 */
package view;

/**
 *
 * @author italorossi
 */
public class frmReservaMesa extends javax.swing.JFrame {

    /** Creates new form frmReservaMesa */
    public frmReservaMesa() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlReservaMesa = new javax.swing.JPanel();
        lblDataMesa = new javax.swing.JLabel();
        lblClienteMesa = new javax.swing.JLabel();
        lblQtdPessoasMesa = new javax.swing.JLabel();
        dcrData = new com.toedter.calendar.JDateChooser();
        cmbClienteMesa = new javax.swing.JComboBox();
        ddcrMesa = new com.toedter.calendar.JDayChooser();
        scpMesa = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        tfdQtdPessoasMesa = new javax.swing.JTextField();
        tbrAdcDelSalvaMesa = new javax.swing.JToolBar();
        btnAdcMesa = new javax.swing.JButton();
        btnDelMesa = new javax.swing.JButton();
        pnlControlesMesa = new javax.swing.JPanel();
        pnlSecundarioControlesMesa = new javax.swing.JPanel();
        btnVoltarInicioMesa = new javax.swing.JButton();
        btnVoltarMesa = new javax.swing.JButton();
        lblControles1Mesa = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        lblControles2Mesa = new javax.swing.JLabel();
        lblControles3Mesa = new javax.swing.JLabel();
        btnSeguirMesa = new javax.swing.JButton();
        btnUltimoMesa = new javax.swing.JButton();
        lblHora1Mesa = new javax.swing.JLabel();
        ftfHoras1Mesa = new javax.swing.JFormattedTextField();
        lblHora2Mesa = new javax.swing.JLabel();
        ftfHoras2Mesa = new javax.swing.JFormattedTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Nova Reserva de Mesa");

        lblDataMesa.setText("DATA:");

        lblClienteMesa.setText("CLIENTE:");

        lblQtdPessoasMesa.setText("QUANTIDADE DE PESSOAS:");

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "", "", "", "", "", ""
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        scpMesa.setViewportView(jTable1);

        tfdQtdPessoasMesa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tfdQtdPessoasMesaActionPerformed(evt);
            }
        });

        tbrAdcDelSalvaMesa.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        tbrAdcDelSalvaMesa.setRollover(true);

        btnAdcMesa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/add-2-icon (2).png"))); // NOI18N
        btnAdcMesa.setFocusable(false);
        btnAdcMesa.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        tbrAdcDelSalvaMesa.add(btnAdcMesa);

        btnDelMesa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/delete-icon.png"))); // NOI18N
        btnDelMesa.setFocusable(false);
        btnDelMesa.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        tbrAdcDelSalvaMesa.add(btnDelMesa);

        pnlControlesMesa.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));

        btnVoltarInicioMesa.setText("|<");
        pnlSecundarioControlesMesa.add(btnVoltarInicioMesa);

        btnVoltarMesa.setText("<");
        pnlSecundarioControlesMesa.add(btnVoltarMesa);

        pnlControlesMesa.add(pnlSecundarioControlesMesa);

        lblControles1Mesa.setText("0");
        pnlControlesMesa.add(lblControles1Mesa);

        lblControles2Mesa.setText("de");
        jPanel4.add(lblControles2Mesa);

        lblControles3Mesa.setText("( 0 )");
        jPanel4.add(lblControles3Mesa);

        btnSeguirMesa.setText(">");
        jPanel4.add(btnSeguirMesa);

        btnUltimoMesa.setText(">|");
        jPanel4.add(btnUltimoMesa);

        pnlControlesMesa.add(jPanel4);

        lblHora1Mesa.setText("HORA:");

        ftfHoras1Mesa.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("h:mm:ss"))));
        ftfHoras1Mesa.setText("12:00:00");
        ftfHoras1Mesa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ftfHoras1MesaActionPerformed(evt);
            }
        });

        lblHora2Mesa.setText("ATÉ:");

        ftfHoras2Mesa.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("h:mm:ss"))));
        ftfHoras2Mesa.setText("12:00:00");
        ftfHoras2Mesa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ftfHoras2MesaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlReservaMesaLayout = new javax.swing.GroupLayout(pnlReservaMesa);
        pnlReservaMesa.setLayout(pnlReservaMesaLayout);
        pnlReservaMesaLayout.setHorizontalGroup(
            pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(scpMesa)
                    .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                        .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                                .addComponent(lblQtdPessoasMesa)
                                .addGap(18, 18, 18)
                                .addComponent(tfdQtdPessoasMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                                .addComponent(lblClienteMesa)
                                .addGap(18, 18, 18)
                                .addComponent(cmbClienteMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                                .addGap(14, 14, 14)
                                .addComponent(lblDataMesa)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(dcrData, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(35, 35, 35)
                                .addComponent(lblHora1Mesa)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ftfHoras1Mesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblHora2Mesa)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ftfHoras2Mesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                                .addComponent(tbrAdcDelSalvaMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(pnlControlesMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(ddcrMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        pnlReservaMesaLayout.setVerticalGroup(
            pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                        .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(pnlControlesMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tbrAdcDelSalvaMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                                .addGap(19, 19, 19)
                                .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(lblHora1Mesa)
                                        .addComponent(lblHora2Mesa)
                                        .addComponent(ftfHoras1Mesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(ftfHoras2Mesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(lblDataMesa, javax.swing.GroupLayout.Alignment.LEADING)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlReservaMesaLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(dcrData, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblClienteMesa)
                            .addComponent(cmbClienteMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(pnlReservaMesaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblQtdPessoasMesa)
                            .addComponent(tfdQtdPessoasMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(29, 29, 29))
                    .addGroup(pnlReservaMesaLayout.createSequentialGroup()
                        .addComponent(ddcrMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                .addComponent(scpMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlReservaMesa, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(pnlReservaMesa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        getAccessibleContext().setAccessibleName("Nova Reserva");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tfdQtdPessoasMesaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tfdQtdPessoasMesaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tfdQtdPessoasMesaActionPerformed

    private void ftfHoras1MesaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ftfHoras1MesaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ftfHoras1MesaActionPerformed

    private void ftfHoras2MesaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ftfHoras2MesaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ftfHoras2MesaActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmReservaMesa.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmReservaMesa.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmReservaMesa.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmReservaMesa.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new frmReservaMesa().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdcMesa;
    private javax.swing.JButton btnDelMesa;
    private javax.swing.JButton btnSeguirMesa;
    private javax.swing.JButton btnUltimoMesa;
    private javax.swing.JButton btnVoltarInicioMesa;
    private javax.swing.JButton btnVoltarMesa;
    private javax.swing.JComboBox cmbClienteMesa;
    private com.toedter.calendar.JDateChooser dcrData;
    private com.toedter.calendar.JDayChooser ddcrMesa;
    private javax.swing.JFormattedTextField ftfHoras1Mesa;
    private javax.swing.JFormattedTextField ftfHoras2Mesa;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JTable jTable1;
    private javax.swing.JLabel lblClienteMesa;
    private javax.swing.JLabel lblControles1Mesa;
    private javax.swing.JLabel lblControles2Mesa;
    private javax.swing.JLabel lblControles3Mesa;
    private javax.swing.JLabel lblDataMesa;
    private javax.swing.JLabel lblHora1Mesa;
    private javax.swing.JLabel lblHora2Mesa;
    private javax.swing.JLabel lblQtdPessoasMesa;
    private javax.swing.JPanel pnlControlesMesa;
    private javax.swing.JPanel pnlReservaMesa;
    private javax.swing.JPanel pnlSecundarioControlesMesa;
    private javax.swing.JScrollPane scpMesa;
    private javax.swing.JToolBar tbrAdcDelSalvaMesa;
    private javax.swing.JTextField tfdQtdPessoasMesa;
    // End of variables declaration//GEN-END:variables
}
